﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.Data.Entity;

namespace HexagonWeb.Models
{
    public class User
    {

        public int ID { get; set; }

        [Required(ErrorMessage = "必填")]
        [StringLength(20, MinimumLength = 6, ErrorMessage = "{1}到{0}个字符")]
        [Display(Name = "用户名")]
        public string UserName { get; set; }

        [Required(ErrorMessage = "必填")]
        [Display(Name = "密码")]
        [DataType(DataType.Password)]
        public string Password { get; set; }

        [Display(Name = "优先选择")]
        [StringLength(100)]
        public string Option { get; set; }

        [Display(Name = "专门服务请求")]
        [StringLength(100)]
        public string Service { get; set; }
    }

    public class CustomerDBContext : DbContext
    {
        public DbSet<User> Users { get; set; }
    } 
}